﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentMigrator;

namespace MigrationTemplate._1_20._05
{
    [Migration(5)]
    public class m4 : Migration
    {
        public override void Down()
        {
            Delete.Table("Main_Directories_User");
        }

        public override void Up()
        {
            Create.Table("Main_Directories_Users")
                .WithColumn("Id").AsInt32().Identity().PrimaryKey()
                .WithColumn("UserId").AsCustom("VARCHAR(50)").NotNullable()
                .WithColumn("Type").AsCustom("VARCHAR(20)").NotNullable()
                .WithColumn("Directory").AsCustom("VARCHAR(MAX)").NotNullable()
                .WithColumn("IsActive").AsBoolean().NotNullable()
                .WithColumn("CreatedDate").AsDateTime().NotNullable();
        }
    }
}